<template>
	<view>
		<block v-for="(item,ind) in goodsEvaList">
		<view class="evaluate">
			<view class="evaluate-top flex align-center">
				<image :src="user.avatar"></image>
				<text>{{user.nick_name}}</text>
			</view>
			<view class="evaluate-num">
				<text>{{item.addtime}}</text>
				<text>规格：{{item.goods_guige}}片</text>
			</view>
			<view class="evaluate-val">{{item.content}}</view>
			<view class="image-con flex align-center justify-between flex-wrap">
				<block v-for="(ite,ind) in item.img_list">
					<image :src="ite.img_url"></image>
				</block>
				
			</view>
		</view>
	 </block>
	</view>
</template>

<script>
	var api = require('@/components/api.js');
	export default {
		data() {
			return {
				user: uni.getStorageSync('user'),
				goodsEvaList:[],
			}
		},
		onLoad(){
			this.loadGoodsEvaList()
		},
		methods: {
			/**
			 * 加载评价
			 */
			loadGoodsEvaList:function(){
				api.get({
					url:'User/GetMyevaList',
					data:{
						user_id:this.user.user_id,
						page:1,
						pagesize:15
					},
					success:data=>{
					console.log(JSON.stringify(data));
					if (data.ErrCode == 0) {
						this.goodsEvaList = data.Response
					}	
					}
				});
			},
			
		}
	}
</script>

<style>
	.image-con image{
		width: 220upx;
		height: 165upx;
	}
	.evaluate{
		padding: 24upx 20upx;
		box-sizing: border-box;
		background-color: #fff;
		margin-bottom: 20upx;
	}
	.evaluate-num{
		margin-top: 20upx;
	}
	.evaluate-num>text:nth-child(2){
		margin-left: 66upx;
	}
	.evaluate-num>text{
			font-size: 24upx;
			color: #999999;
	}
	.evaluate-val{
			font-size: 26upx;
			margin-top: 20upx;
			margin-bottom: 20upx;
			font-size: 26upx;
			color: #000000;
	}
	.evaluate-top image{
		width: 60upx;
			height: 60upx;
			border-radius: 50%;
	}
	.evaluate-top text{
		font-size: 26upx;
			color: #000000;
			margin-left: 18upx;
	}
</style>
